package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.util.List;

/**
 * 商品实体类
 */
@TableName("t_speakProduct")
public class ProductBean {
    /**编号*/
    @TableId(value = "pk_productId",type = IdType.AUTO)
    private Integer id;
    /**商品名*/
    @TableField("p_name")
    private String name;
    /**单价*/
    @TableField("p_price")
    private Integer price;
    /**图片*/
    @TableField("p_imgPath")
    private String imgPath;
    /**评论条数*/
    @TableField(exist = false)
    private Integer infoNum;
    /**评论集合*/
    @TableField(exist = false)
    private List<InfoBean> infoList;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getPrice() {
        return price;
    }

    public void setPrice(Integer price) {
        this.price = price;
    }

    public String getImgPath() {
        return imgPath;
    }

    public void setImgPath(String imgPath) {
        this.imgPath = imgPath;
    }

    public Integer getInfoNum() {
        return infoNum;
    }

    public void setInfoNum(Integer infoNum) {
        this.infoNum = infoNum;
    }

    public List<InfoBean> getInfoList() {
        return infoList;
    }

    public void setInfoList(List<InfoBean> infoList) {
        this.infoList = infoList;
    }

    @Override
    public String toString() {
        return "ProductBean{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", price=" + price +
                ", imgPath='" + imgPath + '\'' +
                ", infoNum=" + infoNum +
                ", infoList=" + infoList +
                "}\n";
    }
}
